# 基于镜像基础
FROM python:3.7
RUN apt update
RUN apt install -y libgl1-mesa-glx
RUN /usr/local/bin/python -m pip install pip==21.0.1

#RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 添加虚拟临时目录
VOLUME /tmp
#指定工作目录
WORKDIR /app
ADD ./ ./
#创建挂载点
#VOLUME ["/home/alex/python_project/trition_server_client/input","/input"]
# 安装所需的包
COPY requirements.txt ./
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements.txt
RUN chmod -x ./app.py

#ENTRYPOINT ["/bin/bash"]
#CMD ["python", "client.py"] && ["python", "detect_spider.py"]
#CMD ["spider-start.sh"]
CMD ["python", "./app.py"]
